package gdao

import (
	"fmt"
	"gorm.io/driver/mysql"
	"gorm.io/gorm"
	"gorm.io/gorm/logger"
	"log"
)

var gdb *gorm.DB

func init() {
	var err error
	dsn := "bt_go:07ZjxQG87NTO9hUL@tcp(175.178.40.245:3309)/jingdong?charset=utf8mb4&parseTime=True"
	gdb, err = gorm.Open(mysql.Open(dsn), &gorm.Config{
		Logger: logger.Default.LogMode(logger.Info),
	})
	if err != nil {
		log.Println(err)
		return
	}
	fmt.Println(gdb.CreateBatchSize)
}
